package com.frinder.official.akka.routing;

import akka.actor.ActorRef;
import akka.routing.Routee;

/**
 * Created by frinder on 2017/9/30.
 */
public class RedundancyRoutingLogicRoutee implements Routee {

    public final int n;

    public RedundancyRoutingLogicRoutee(int n) {
        this.n = n;
    }

    @Override
    public void send(Object message, ActorRef sender) {
    }

    @Override
    public int hashCode() {
        return n;
    }

    @Override
    public boolean equals(Object obj) {
        return (obj instanceof RedundancyRoutingLogicRoutee)
                && n == ((RedundancyRoutingLogicRoutee) obj).n;
    }
}
